

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Sphinx Quickstart Template &mdash; LLVM 3.2 documentation</title>
    
    <link rel="stylesheet" href="_static/llvm-theme.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '3.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="LLVM 3.2 documentation" href="index.html" />
    <link rel="up" title="User Guides" href="userguides.html" />
    <link rel="next" title="Code Reviews with Phabricator" href="Phabricator.html" />
    <link rel="prev" title="How to submit an LLVM bug report" href="HowToSubmitABug.html" />
<style type="text/css">
  table.right { float: right; margin-left: 20px; }
  table.right td { border: 1px solid #ccc; }
</style>

  </head>
  <body>
<div class="logo">
  <a href="index.html">
    <img src="_static/logo.png"
         alt="LLVM Logo" width="250" height="88"/></a>
</div>

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="Phabricator.html" title="Code Reviews with Phabricator"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="HowToSubmitABug.html" title="How to submit an LLVM bug report"
             accesskey="P">previous</a> |</li>
  <li><a href="http://llvm.org/">LLVM Home</a>&nbsp;|&nbsp;</li>
  <li><a href="index.html">Documentation</a>&raquo;</li>

          <li><a href="userguides.html" accesskey="U">User Guides</a> &raquo;</li> 
      </ul>
    </div>

      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Sphinx Quickstart Template</a><ul>
<li><a class="reference internal" href="#introduction-and-quickstart">Introduction and Quickstart</a></li>
<li><a class="reference internal" href="#guidelines">Guidelines</a></li>
<li><a class="reference internal" href="#example-section">Example Section</a><ul>
<li><a class="reference internal" href="#example-subsection">Example Subsection</a><ul>
<li><a class="reference internal" href="#example-subsubsection">Example Subsubsection</a><ul>
<li><a class="reference internal" href="#hopefully-you-won-t-need-to-be-this-deep">Hopefully you won&#8217;t need to be this deep</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="HowToSubmitABug.html"
                        title="previous chapter">How to submit an LLVM bug report</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="Phabricator.html"
                        title="next chapter">Code Reviews with Phabricator</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/SphinxQuickstartTemplate.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="sphinx-quickstart-template">
<h1>Sphinx Quickstart Template<a class="headerlink" href="#sphinx-quickstart-template" title="Permalink to this headline">¶</a></h1>
<p><em>Section author: Sean Silva &lt;<a class="reference external" href="mailto:silvas&#37;&#52;&#48;purdue&#46;edu">silvas<span>&#64;</span>purdue<span>&#46;</span>edu</a>&gt;</em></p>
<div class="section" id="introduction-and-quickstart">
<h2>Introduction and Quickstart<a class="headerlink" href="#introduction-and-quickstart" title="Permalink to this headline">¶</a></h2>
<p>This document is meant to get you writing documentation as fast as possible
even if you have no previous experience with Sphinx. The goal is to take
someone in the state of &#8220;I want to write documentation and get it added to
LLVM&#8217;s docs&#8221; and turn that into useful documentation mailed to llvm-commits
with as little nonsense as possible.</p>
<p>You can find this document in <tt class="docutils literal"><span class="pre">docs/SphinxQuickstartTemplate.rst</span></tt>. You
should copy it, open the new file in your text editor, write your docs, and
then send the new document to llvm-commits for review.</p>
<p>Focus on <em>content</em>. It is easy to fix the Sphinx (reStructuredText) syntax
later if necessary, although reStructuredText tries to imitate common
plain-text conventions so it should be quite natural. A basic knowledge of
reStructuredText syntax is useful when writing the document, so the last
~half of this document (starting with <a class="reference internal" href="#example-section">Example Section</a>) gives examples
which should cover 99% of use cases.</p>
<p>Let me say that again: focus on <em>content</em>.</p>
<p>Once you have finished with the content, please send the <tt class="docutils literal"><span class="pre">.rst</span></tt> file to
llvm-commits for review.</p>
</div>
<div class="section" id="guidelines">
<h2>Guidelines<a class="headerlink" href="#guidelines" title="Permalink to this headline">¶</a></h2>
<p>Try to answer the following questions in your first section:</p>
<ol class="arabic simple">
<li>Why would I want to read this document?</li>
<li>What should I know to be able to follow along with this document?</li>
<li>What will I have learned by the end of this document?</li>
</ol>
<p>Common names for the first section are <tt class="docutils literal"><span class="pre">Introduction</span></tt>, <tt class="docutils literal"><span class="pre">Overview</span></tt>, or
<tt class="docutils literal"><span class="pre">Background</span></tt>.</p>
<p>If possible, make your document a &#8220;how to&#8221;. Give it a name <tt class="docutils literal"><span class="pre">HowTo*.rst</span></tt>
like the other &#8220;how to&#8221; documents. This format is usually the easiest
for another person to understand and also the most useful.</p>
<p>You generally should not be writing documentation other than a &#8220;how to&#8221;
unless there is already a &#8220;how to&#8221; about your topic. The reason for this
is that without a &#8220;how to&#8221; document to read first, it is difficult for a
person to understand a more advanced document.</p>
<p>Focus on content (yes, I had to say it again).</p>
<p>The rest of this document shows example reStructuredText markup constructs
that are meant to be read by you in your text editor after you have copied
this file into a new file for the documentation you are about to write.</p>
</div>
<div class="section" id="example-section">
<h2>Example Section<a class="headerlink" href="#example-section" title="Permalink to this headline">¶</a></h2>
<p>Your text can be <em>emphasized</em>, <strong>bold</strong>, or <tt class="docutils literal"><span class="pre">monospace</span></tt>.</p>
<p>Use blank lines to separate paragraphs.</p>
<p>Headings (like <tt class="docutils literal"><span class="pre">Example</span> <span class="pre">Section</span></tt> just above) give your document
structure. Use the same kind of adornments (e.g. <tt class="docutils literal"><span class="pre">======</span></tt> vs. <tt class="docutils literal"><span class="pre">------</span></tt>)
as are used in this document. The adornment must be the same length as the
text above it. For Vim users, variations of <tt class="docutils literal"><span class="pre">yypVr=</span></tt> might be handy.</p>
<div class="section" id="example-subsection">
<h3>Example Subsection<a class="headerlink" href="#example-subsection" title="Permalink to this headline">¶</a></h3>
<p>Make a link <a class="reference external" href="http://llvm.org/">like this</a>. There is also a more
sophisticated syntax which <a class="reference external" href="http://en.wikipedia.org/wiki/LLVM">can be more readable</a> for longer links since
it disrupts the flow less. You can put the <tt class="docutils literal"><span class="pre">..</span> <span class="pre">_`link</span> <span class="pre">text`:</span> <span class="pre">&lt;URL&gt;</span></tt> block
pretty much anywhere later in the document.</p>
<p>Lists can be made like this:</p>
<ol class="arabic simple">
<li>A list starting with <tt class="docutils literal"><span class="pre">#.</span></tt> will be automatically numbered.</li>
<li>This is a second list element.<ol class="arabic">
<li>They nest too.</li>
</ol>
</li>
</ol>
<p>You can also use unordered lists.</p>
<ul class="simple">
<li>Stuff.<ul>
<li>Deeper stuff.</li>
</ul>
</li>
<li>More stuff.</li>
</ul>
<div class="section" id="example-subsubsection">
<h4>Example Subsubsection<a class="headerlink" href="#example-subsubsection" title="Permalink to this headline">¶</a></h4>
<p>You can make blocks of code like this:</p>
<div class="highlight-c++"><div class="highlight"><pre><span class="kt">int</span> <span class="n">main</span><span class="p">()</span> <span class="p">{</span>
  <span class="k">return</span> <span class="mi">0</span>
<span class="p">}</span>
</pre></div>
</div>
<p>For a shell session, use a <tt class="docutils literal"><span class="pre">bash</span></tt> code block:</p>
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span><span class="nb">echo</span> <span class="s2">&quot;Goodbye cruel world!&quot;</span>
<span class="nv">$ </span>rm -rf /
</pre></div>
</div>
<p>If you need to show LLVM IR use the <tt class="docutils literal"><span class="pre">llvm</span></tt> code block.</p>
<div class="section" id="hopefully-you-won-t-need-to-be-this-deep">
<h5>Hopefully you won&#8217;t need to be this deep<a class="headerlink" href="#hopefully-you-won-t-need-to-be-this-deep" title="Permalink to this headline">¶</a></h5>
<p>If you need to do fancier things than what has been shown in this document,
you can mail the list or check Sphinx&#8217;s <a class="reference external" href="http://sphinx.pocoo.org/rest.html">reStructuredText Primer</a>.</p>
</div>
</div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="Phabricator.html" title="Code Reviews with Phabricator"
             >next</a> |</li>
        <li class="right" >
          <a href="HowToSubmitABug.html" title="How to submit an LLVM bug report"
             >previous</a> |</li>
  <li><a href="http://llvm.org/">LLVM Home</a>&nbsp;|&nbsp;</li>
  <li><a href="index.html">Documentation</a>&raquo;</li>

          <li><a href="userguides.html" >User Guides</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, LLVM Project.
      Last updated on 2012-12-21.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>